package com.hxiaoyi.cloud.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * 描述
 *
 * @author 黄敬意
 * @date 2022-02-03 23:50
 **/
@Configuration
public class ApplicationContextConfig {
    /**
     * @LoadBalanced 赋予RestTemplate 负载均衡的能力
     */
    @Bean
    @LoadBalanced
    public RestTemplate getRestTemplate(){
        return  new RestTemplate();
    }
}
